package cn.t.keycloak.demo.jpa;

import lombok.extern.slf4j.Slf4j;
import org.keycloak.connections.jpa.entityprovider.JpaEntityProvider;

import java.util.Collections;
import java.util.List;

/**
 * 用户已认证手机 - 自定义扩展
 * @author 陶敏麒
 * @date 2023/11/22 14:22
 */
@Slf4j
public class VerifyPhoneJpaEntityProvider implements JpaEntityProvider {


    @Override
    public List<Class<?>> getEntities() {
        log.info("=====================获取到自定义数据对象");
        return Collections.singletonList(VerifyPhoneEntity.class);
    }

    @Override
    public String getChangelogLocation() {
        return "META-INF/changelog/verify-phone-changelog.xml";
    }

    @Override
    public String getFactoryId() {
        return VerifyPhoneJpaEntityProviderFactory.PROVIDER_ID;
    }

    @Override
    public void close() {

    }
}
